Function Subspace :: _u32 literal

auto operator""_u32(unsigned long long val) -> u32

For writing u32 literals.

Un-qualified integer literals are 32 bits large (the size of int) and signed values, unless a literal suffix modifies them, such as with _u32 which creates an unsigned 32-bit value. This is the same as the u suffix except that it forces a safe numeric type instead of a primitive value when this is needed (such as for templates or member function access).

Values out of range for u32 will fail to compile.

Examples

auto i = 123_u32 - (5_u32).abs();
sus_check(i == 118_u32);